import { NGameRPCClass, NGameRPCFun, NRPCMode, RNGameRPCFun } from "../../../../ngame/decorator/NDecorator";
import { UIConfig, UI_VIEW } from "../../../GameConst";

export enum EventArgeType{
    Tips
}

export interface EventArge{

    type:EventArgeType;
    data:any

}

@NGameRPCClass("CNWorld2Action")
export default class CNWorld2Action{

    //接收服务器消息
    @RNGameRPCFun("onRelayEvent",NRPCMode.DEFAULT,'StateSync')
    static onRelayEvent(args:EventArge){
        console.log("CNWorld2Action - onRelayEvent",args);
        switch(args.type){
            case EventArgeType.Tips:
                UI_VIEW.POPUP.show(UIConfig.Tips,args.data);
                break;
        }
    }

}

